﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AspRepeater.aspx.cs" Inherits="_513X0018_web08.AspRepeater" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <h3>Repeater</h3>
    <form id="Form1" runat="server">
    <asp:Repeater ID="Repeater1" runat="server">
        <HeaderTemplate>
            <table>
                <tr>
                    <td bgcolor="#cccc99" width="200">
                        <b>Product Name</b>
                    </td>
                    <td bgcolor="#cccc99" width="200">
                        <b>Product Description</b>
                    </td>
                    <td bgcolor="#cccc99" width="200">
                        <b>Unit Price</b>
                    </td>
                    <td bgcolor="#cccc99" width="200">
                        <b>Manufacturer</b>
                    </td>
                </tr>
        </HeaderTemplate>
        <ItemTemplate>
            <tr>
                <td>
                    <%# DataBinder.Eval(Container.DataItem,"ProductName") 
                    %>
                </td>
                <td>
                    <%# DataBinder.Eval(Container.DataItem,"ProductDescription") 
                    %>
                </td>
                <td>
                    <%# DataBinder.Eval(Container.DataItem, "UnitPrice")  %>
                </td>
                <td>
                    <%# DataBinder.Eval(Container.DataItem, "Manufacturer")  %>
                </td>
            </tr>
        </ItemTemplate>
        <AlternatingItemTemplate>
            <tr>
                <td bgcolor="#ff00ff">
                    <%# DataBinder.Eval(Container.DataItem, "ProductName") %>
                </td>
                <td bgcolor="#ff00ff">
                    <%# DataBinder.Eval(Container.DataItem, "ProductDescription") %>
                </td>
                <td bgcolor="#ff00ff">
                    <%# DataBinder.Eval(Container.DataItem, "UnitPrice") %>
                </td>
                 <td bgcolor="#ff00ff">
                    <%# DataBinder.Eval(Container.DataItem, "Manufacturer") %>
                </td>
            </tr>
        </AlternatingItemTemplate>
        <SeparatorTemplate>
            <tr>
                <td colspan="2" align="center">
                    - - -
                </td>
            </tr>
        </SeparatorTemplate>
        <FooterTemplate>
            </table>
        </FooterTemplate>
    </asp:Repeater>
    </form>
</body>
</html>
